package com.naire.modul.projecplan.service;

import net.common.service.GeneralService;
import com.naire.modul.projecplan.dao.ProjecplanDao;
import com.naire.modul.projecplan.dao.impl.ProjecplanDaoImpl;
import com.naire.modul.projecplan.vo.ProjecplanVo;

/**
 * 
 * 
 * @author Administrator
 * 
 */
public class ProjecplanEditorService extends GeneralService {

	private ProjecplanVo bean;
	private Integer periods_id;

	@Override
	public void execute() throws Exception {
		ProjecplanDao dao = new ProjecplanDaoImpl();
		bean.setPeriods_id(periods_id);
		if (bean.getPlan_id() != null) {
			dao.update(bean);
		} else {
			dao.insert(bean);
		}
	}

	public void setBean(ProjecplanVo bean) {
		this.bean = bean;
	}

	public void setPeriods_id(Integer periods_id) {
		this.periods_id = periods_id;
	}

}
